package com.twang.stock.common;

import org.apache.commons.lang3.ObjectUtils;

public class EmptyUtil {

    public static boolean isEmpty(Object obj) {
        //null
        if (obj == null) {
            return true;
        }
        //String
        if (obj instanceof String) {
            return ((String) obj).trim().equals("");
        }
        //Others
        return  ObjectUtils.isEmpty(obj);
    }
    public static boolean isNotEmpty(Object obj) {
        return !isEmpty(obj);
    }
}